package com.hsylient.javase.chapter11.test;

public class Customer extends Thread {

    private final String lock;

    public Customer(String lock) {
        this.lock = lock;
    }

    @Override
    public void run() {
        synchronized (lock) {
            System.out.println("开始吃面条");
            ThreadTest.IS_PREPARE = false;
            System.out.println("吃完了，通知厨师接着做");
        }
    }
}
